package com.wanxi.education.mapper;

import com.wanxi.education.model.pojo.User;
import com.wanxi.education.model.vo.user.*;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Author: YanZhengYi
 * @Description:
 * @Date: Created in 2021/9/27
 * @Version: 1.0
 */

public interface UserMapper {
    //c端客户与数据库交互
    List<CUserReturnVo> cUserFindPage(CUserVo cUserVo);

    Integer cUserUpdate(UpdateCUserVo updateCUserVo);

    Integer cUserInsert(UpdateCUserVo updateCUserVo);

    //b端用户与数据库交互
    List<BUserReturnVo> bUserFindPage(BUserVo bUserVo);

    Integer bUserUpdate(UpdateBUserVo updateBUserVo);

    Integer bUserInsert(UpdateBUserVo updateBUserVo);

    //a端用户与数据库交互
    List<AUserReturnVo> aUserFindPage(AUserVo aUserVo);

    Integer aUserUpdate(UpdateAUserVo updateAUserVo);

    Integer aUserInsert(UpdateAUserVo updateAUserVo);

    Integer deleteAdmin(Long id);
    //BC端共用的删除和ABC端共用的通过Id找数据功能
    Integer delete(Long id);

    User findById(Long id);


    Integer deleteRole(Long id);

    Integer insertRole(List<Integer> roleIds,Long id);


    User findByPhone(String phone);

    Integer cRegister(CUserRegisterVo cUserRegisterVo);


    User findByPhoneAndStatusAndId(String phone);
}
